package com.stars.home.vmodel

import android.app.Application
import android.text.TextUtils
import com.stars.home.utils.net.NetEngine
import com.trailer.base.base.BRRepository
import com.trailer.base.base.BRViewModel
import com.trailer.base.net.IResp

/**
 *
 *on 2020/9/25
 */
class InvoiceOrderVModel(application: Application) : BRViewModel<BRRepository>(application) {



    fun isShowCarName(vehicle_name:String?,username:String?):String{
        if(TextUtils.isEmpty(vehicle_name)&& TextUtils.isEmpty(username)){
            return ""
        }
        if(TextUtils.isEmpty(vehicle_name)){
            return ""
        }
        if(TextUtils.isEmpty(username)){
            return ""+vehicle_name
        }
        return "$vehicle_name ($username)"

    }


    override fun apiFunc(): suspend () -> IResp<*> {
        return { NetEngine.service.invoiceOrder("10",repository().page) }
    }


}
